//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Resource Application Block
//===============================================================================

using System;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Security.Permissions;

namespace EntLibContrib.Resource.Managers
{
	/// <summary>
	/// Custom resource manager for managing resources held in binary files
	/// </summary>
	public class BinaryResourceManager : FileResourceManager
	{
		#region Construction
		/// <summary>
		/// Initializes a new instance of the <see cref="BinaryResourceManager"/> class.
		/// </summary>
		/// <param name="pathName">the file path to the resource files.</param>
		/// <param name="baseName">base name for the set of resources.</param>
		public BinaryResourceManager(string pathName, string baseName) : base(pathName, baseName)
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="BinaryResourceManager"/> class.
		/// </summary>
		/// <param name="resourceType">Type of the resource.</param>
		public BinaryResourceManager(Type resourceType) : base(resourceType)
		{
		}
		#endregion

		#region Protected Methods
		/// <summary>
		/// Creates the resource set.
		/// </summary>
		/// <param name="pathName">the file path to the resource files.</param>
		/// <param name="baseName">base name for the set of resources.</param>
		/// <param name="cultureInfo">The culture info.</param>
		/// <returns>a common resource set type</returns>
		protected override CommonResourceSet CreateResourceSet(string pathName, string baseName, CultureInfo cultureInfo)
		{
			return new BinaryResourceSet(pathName, baseName, cultureInfo);
		}
		#endregion
	}
}
